The Correspondence Between the Logical Algorithms Language and CHR
نویسندگان
چکیده
This paper investigates the relationship between the Logical Algorithms formalism (LA) of Ganzinger and McAllester and Constraint Handling Rules (CHR). We present a translation scheme from LA to CHR: CHR with rule priorities and show that the metacomplexity theorem for LA can be applied to a subset of CHR via inverse translation. This result is compared with previous work. Inspired by the high-level implementation proposal of Ganzinger and McAllester, we demonstrate how LA programs can be compiled into CHR rules that interact with a scheduler written in CHR. This forms the first actual implementation of LA. Our implementation achieves the required complexity for the meta-complexity theorem to hold and can execute a subset of CHR with strong complexity bounds.
منابع مشابه
Logical Algorithms meets CHR: A meta-complexity result for Constraint Handling Rules with rule priorities
This paper investigates the relationship between the Logical Algorithms language (LA) of Ganzinger and McAllester and Constraint Handling Rules (CHR). We present a translation schema from LA to CHR: CHR with rule priorities, and show that the meta-complexity theorem for LA can be applied to a subset of CHR via inverse translation. Inspired by the high-level implementation proposal for Logical A...
متن کاملJustifications in Constraint Handling Rules for Logical Retraction in Dynamic Algorithms
We present a straightforward source-to-source transformation that introduces justifications for user-defined constraints into the CHR programming language. Then a scheme of two rules suffices to allow for logical retraction (deletion, removal) of constraints during computation. Without the need to recompute from scratch, these rules remove not only the constraint but also undo all consequences ...
متن کاملProceedings of CHR 2005, Second Workshop on Constraint Handling Rules
This book contains the Proceedings of CHR 2005, the Second Workshop on Constraint Handling Rules, held at the occasion of ICLP 2005 in Sitges (Spain) on October 5, 2005. The Constraint Handling Rules (CHR) language has become a major declarative specification and implementation language for constraint reasoning algorithms and applications. Algorithms are often specified using inference rules, r...
متن کاملFirst Workshop on Constraint Handling Rules
The Constraint Handling Rules (CHR) language has become a major specification and implementation language for constraint-based algorithms and applications. Algorithms are often specified using inference rules, rewrite rules, sequents, proof rules, or logical axioms that can be directly written in CHR. Based on first order predicate logic, this clean semantics of CHR facilitates non-trivial prog...
متن کاملAnalysing the CHR Implementation of Union-Find
CHR (Constraint Handling Rules) is a committed-choice rulebased language that was originally intended for writing constraint solvers. Over time, CHR is used more and more as a general-purpose programming language. In companion paper [12] we show that it is possible to write the classic union-find algorithm and variants in CHR with bestknown time complexity, which is believed impossible in Prolo...
متن کامل